import service from '../internal/service'

//  接待详情
export function APIGmallReception ({ shopId, date = '' }) {
  return service({
    url: `/api/shops/${shopId}/reception?date=${date}`,
    method: 'get'
  })
}

// 导购信息接口
export function APIGmallSalemans ({ shopId, page = 1, pagesize = 10 }) {
  return service({
    url: `/api/shops/${shopId}/salemans/?page=${page}&page_size=${pagesize}`,
    method: 'get'
  })
}
// 导购更新接口
export function APIGmallUpdateSalemans ({ shopId, saleman }, formdata) {
  return service({
    header: {'Content-Type': 'multipart/form-data'},
    url: `/api/shops/${shopId}/salemans/${saleman}`,
    method: 'post',
    data: formdata
  })
}
// 导购删除接口
export function APIGmallDeleteSalemans ({ shopId, saleman }) {
  return service({
    url: `/api/shops/${shopId}/salemans/${saleman}`,
    method: 'delete'
  })
}

// 导购新增接口
export function APIGmallAddSalemans ({ shopId }, formdata) {
  return service({
    header: {'Content-Type': 'multipart/form-data'},
    url: `/api/shops/${shopId}/salemans`,
    method: 'post',
    data: formdata
  })
}
